package com.chhh.cranelease.service.impl;

import com.chhh.cranelease.entity.CarInfo;
import com.chhh.cranelease.entity.Staff;
import com.chhh.cranelease.mapper.BaseInfoMapper;
import com.chhh.cranelease.service.BaseInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BaseInfoServiceImpl implements BaseInfoService {

    @Autowired
    private BaseInfoMapper baseInfoMapper;

    @Override
    public List<CarInfo> selectAll() {
        return baseInfoMapper.selectAllCarInfo();
    }

    // 插入吊车
    @Override
    public void insertNewCar(CarInfo carInfo) {
        baseInfoMapper.insertNewCar(carInfo);
    }
    // 修改
    @Override
    public void updateThisCar(CarInfo carInfo) {
       baseInfoMapper.updateThisCar(carInfo);
    }

    @Override
    public List<Staff> selectAllDriver() {
        return baseInfoMapper.selectAllDriver();
    }

    @Override
    public void deleteThisCar(Integer[] c_id) {
         baseInfoMapper.deleteThoseCar(c_id);
    }
}
